<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">
<head>
        <title>TV信息</title>
    <jsp:include page="/WEB-INF/view/commons/css.jsp" />
</head>
<body >
<div id="main-container" class="container-fluid">
    <form  action="biz4sinfo/${action eq "create" ?"save":"update"}" name="inputForm" id="inputForm" method="post" class="form-horizontal">
    <input name="id" id="id" value="${entity.id}" type="hidden" />
    <div class="form-group">
        <label class="col-sm-1 control-label">编码：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="cord" value="${entity.cord}" placeholder="编码">
        </div>
        <label class="col-sm-1 control-label">门店名称：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="name" value="${entity.name}" placeholder="门店名称">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-1 control-label">TV-ID：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="tvId" value="${entity.tvId}" placeholder="TV-ID">
        </div>
        <label class="col-sm-1 control-label">TV-密码：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="tvPass" value="${entity.tvPass}" placeholder="TV-密码">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-1 control-label">服务器密码：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="serverPass" value="${entity.serverPass}" placeholder="服务器密码">
        </div>
        <label class="col-sm-1 control-label">TV状态：</label>
        <div class="col-md-4">
            <d:select clazz="selectpicker" name="tvStatus" list="${tvStatuss}" selected="${entity.tvStatus}"/>
        </div>
       <%-- <label class="col-sm-1 control-label">负责人：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="linkMan" value="${entity.linkMan}" placeholder="负责人">
        </div>--%>
    </div>
    <div class="form-group">
         <label class="col-sm-1 control-label">备注：</label>
            <div class="col-md-4">
                <input type="text" class="form-control" name="remark" value="${entity.remark}" placeholder="备注">
            </div>
         </div>
    <%--<div class="form-group">
        <label class="col-sm-1 control-label">负责人电话：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="linkMobile" value="${entity.linkMobile}" placeholder="负责人电话">
        </div>
        <label class="col-sm-1 control-label">IT运维：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="itName" value="${entity.itName}" placeholder="IT运维">
        </div>
    </div>--%>
    <%--<div class="form-group">
        <label class="col-sm-1 control-label">IT电话：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="itMobile" value="${entity.itMobile}" placeholder="IT电话">
        </div>
        <label class="col-sm-1 control-label">批次：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="batchNum" value="${entity.batchNum}" placeholder="批次">
        </div>
    </div>--%>
        <hr>
    <div class="form-group">
        <label class="col-sm-1 control-label">系统版本：</label>
        <div class="col-md-4">
            <d:select clazz="selectpicker" name="sysVersion" list="${sysVersions}" selected="${entity.sysVersion}"/>
        </div>
        <label class="col-sm-1 control-label">升级状态：</label>
        <div class="col-md-4">
            <d:select clazz="selectpicker" name="upgraed" list="${upgraeds}" selected="${entity.upgraed}"/>
        </div>
    </div>
    <div class="form-group">

        <label class="col-sm-1 control-label">版本备注：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="versionRemark" value="${entity.versionRemark}" placeholder="版本备注">
        </div>
        <label class="col-sm-1 control-label">更新时间：</label>
        <div class="col-md-4">
            <input type="text" class="span1 Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" name="upgradeTime" value="${entity.upgradeTimeStr}" placeholder=更新时间 />
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-1 col-sm-2">
            <button id="saveBtn" type="submit" class="btn btn-sm btn-primary"><i class="fa fa-floppy-o"></i> 提交</button>
            <button type="button" class="btn btn-sm link_close"><i class="fa fa-close"></i> 关闭</button>
        </div>
    </div>
    </form>
</div><!--/#main-container-->

<!-- script start -->
<jsp:include page="/WEB-INF/view/commons/js.jsp" />
<script type="text/javascript">
    $(document).ready(function(e) {
        var options = {
            rules:{
                cord : { required : true, maxlength : 20 },
                name : { required : true, maxlength : 50 },
                tvId : { required : true, maxlength : 20 },
                tvPass : { required : true, maxlength : 50 },
                serverPass : { required : true, maxlength : 50 },
                linkMan : { maxlength : 50 },
                linkMobile : { maxlength : 12 },
                itName : { maxlength : 50 },
                itMobile : { maxlength : 12 },
                batchNum : { digits : true  },
                sysVersion : { maxlength : 10 },
                tvStatus : { required : true }
                
            },
            submitHandler:function(form){
                $(form).ajaxSubmit({
                    type:'post',
                    dataType:'json',
                    success:function(data){
                        if(data.success){
                            $('#searchBtn', parent.document).click();
                            closeIframe();
                        }else{
                            layer.alert(data.msg);
                        }
                    }
                });
            }
        };
        $("#inputForm").validate(options);
    });
</script>
<!-- script end -->
</body>
</html>
